use Dosvid
go

if exists(select 1
		  from sysobjects
		  where name = 'BackUpHistory')
  drop table BackUpHistory
go

create table BackUpHistory
(
  Id int identity(1,1) not null,
  BackupDate datetime not null,
  BackUpTypeID int not null,
  [Status] nvarchar(255) null
)  
go

alter table BackUpHistory add constraint PK_BackUpHistory_Id primary key(Id)
go


alter table BackUpHistory add constraint FK_BackUpHistory_BackUpType_BackUpTypeID 
      foreign key (BackUpTypeID) references BackUpTypes(Id) on delete cascade
go